import {Level} from "./Level.ts";



class Game {
    life = 3
    level: Level = new Level()
    levelIndex = 0
    start() {
        this.level = new Level()
        this.level.start()
    }
    playerDie(){
        this.life--
        if(this.life <= 0){
            alert('Game Over')
        }else {
            this.level.newPlayer()
        }
    }
    enemyDie(){
        this.level.enemyDie()
    }
}

export const game = new Game()